<?php
/* @var $this TicketStatusController */
/* @var $model TicketStatus */

$this->breadcrumbs=array(
	'Ticket Status'=>array('index'),
	'Manage',
);
if ((Yii::app()->user->type==="Personnel")) {
$this->menu=array(
	array('label'=>'List', 'url'=>array('index')),
	//array('label'=>'Create', 'url'=>array('create')),
);
}else {
$this->menu=array(
        array('label'=>'List', 'url'=>array('index')),
        array('label'=>'Create', 'url'=>array('create')),
        );
        }

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#ticket-status-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Ticket Status</h1>


<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'ticket-status-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'status',
		'remarks',
		/*
		'report_date',
		'report_time',
		'current_date',
		'current_time',
		'start_date',
		'start_time',
		'stop_date',
		'stop_time',
		'ticket_id',
		*/
		//'ticket_id',
				array('name'=>'ticket_id', 'header'=> 'Ticket', 'value'=>'$data->ticket->ticket_name'),
		
				
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
